package pers.lx.crm.service.report.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pers.lx.crm.base.common.pigeon.Result;
import pers.lx.crm.dao.report.ReportDao;
import pers.lx.crm.entiy.report.ReportRequestDO;
import pers.lx.crm.service.report.ReportService;

/**
 * Created by lxl on 2017/5/11.
 */
@Service
public class ReportServiceImpl implements ReportService {

    @Autowired
    private ReportDao reportDao ;

    @Override
    public Result getReport(ReportRequestDO reportRequestDO) {
        Result result = new Result() ;
        if(reportRequestDO.getType()==1){
            result.addParam("list",reportDao.selectBusinessNumberReport(reportRequestDO));
        }else {
            result.addParam("list",reportDao.selectBusinessTotalReport(reportRequestDO));
        }
        return result;
    }
}

